﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using DevPhone.Controls;
using Microsoft.Phone.Controls;
using GestureEventArgs = System.Windows.Input.GestureEventArgs;

namespace DevPhoneToolkitSample.Samples
{
    public partial class WindowsBoxColorSample : PhoneApplicationPage
    {
        public WindowsBoxColorSample()
        {
            InitializeComponent();
        }

        private static void MsgReset(WindowsBoxResultEventArgs e)
        {
            WindowsBoxService.ResetToDefaultValues();
        }

        private void MsgCorTap(object sender, GestureEventArgs e)
        {
            WindowsBoxService.Settings()
                .BorderColor(Colors.Red)
                .ButtonBackgroundBrush(new SolidColorBrush(Colors.Blue))
                .ButtonForegroundBrush(new SolidColorBrush(Colors.Yellow))
                .ContentBackgroundBrush(new SolidColorBrush(Colors.Orange))
                .ContentForegroundBrush(new SolidColorBrush(Colors.Black))
                .TitleBackgroundBrush(new SolidColorBrush(Colors.Green))
                .TitleForegroundBrush(new SolidColorBrush(Colors.Black))
                .OverlayColor(Colors.Magenta)
                .OverlayOpacity(0.7);

            WindowsBoxService.Set()
                .Title("Title")
                .AfterClosed(MsgReset)
                .Show("Sample message.");
        }

        private void MsgLayTap(object sender, GestureEventArgs e)
        {
            WindowsBoxService.Settings()
                .Border(8)
                .CornerRadius(0);

            WindowsBoxService.Set()
                .Title("Title")
                .AfterClosed(MsgReset)
                .Show("Sample message.");
        }

        private void MsgErrTap(object sender, GestureEventArgs e)
        {
            WindowsBoxService.Settings()
                .ErrorBackgroundBrush(new SolidColorBrush(Colors.Purple))
                .ErrorForegroundBrush(new SolidColorBrush(Colors.Yellow));

            WindowsBoxService.Box()
                .MessageBox("Title", WindowsBoxMessageType.Error, MsgReset)
                .Show("Sample message.");
        }

    }
}